﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <style type="text/css">
        .draggable { width: 90px; height: 80px; padding: 5px; float: left; margin: 0 10px 10px 0; font-size: .9em; }
        .ui-widget-header p, .ui-widget-content p { margin: 0; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:Panel ID="Panel3" runat="server" CssClass="ui-widget-header" Height="140px">
        <p>
            I'm a snap target</p>
    </asp:Panel>
    <br clear="both" />
    <asp:Panel ID="Panel1" runat="server" CssClass="draggable ui-widget-content">
        <p>
            Default (snap: true), snaps to all other draggable elements</p>
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server" CssClass="draggable ui-widget-content">
        <p>
            I only snap to the big box</p>
    </asp:Panel>
    <asp:Panel ID="Panel4" runat="server" CssClass="draggable ui-widget-content">
        <p>
            I only snap to the outer edges of the big box</p>
    </asp:Panel>
    <asp:Panel ID="Panel5" runat="server" CssClass="draggable ui-widget-content">
        <p>
            I snap to a 20 x 20 grid</p>
    </asp:Panel>
    <asp:Panel ID="Panel6" runat="server" CssClass="draggable ui-widget-content">
        <p>
            I snap to a 80 x 80 grid</p>
    </asp:Panel>
    <DotNetAge:Draggable ID="Draggable1" runat="server" AllowSnap="true">
        <Target TargetID="Panel1" />
    </DotNetAge:Draggable>
    <DotNetAge:Draggable ID="Draggable2" runat="server">
        <Target TargetID="Panel2" />
        <SnapTo TargetID="Panel3" />
    </DotNetAge:Draggable>
    <DotNetAge:Draggable ID="Draggable3" runat="server" AllowSnap="True" SnapMode="Outer">
        <Target TargetID="Panel4" />
        <SnapTo TargetID="Panel3" />
    </DotNetAge:Draggable>
    <DotNetAge:Draggable ID="Draggable4" runat="server" SnapX="20" SnapY="20">
        <Target TargetID="Panel5" />
    </DotNetAge:Draggable>
    <DotNetAge:Draggable ID="Draggable5" runat="server" SnapX="80" SnapY="80">
        <Target TargetID="Panel6" />
    </DotNetAge:Draggable>
    </form>
</body>
</html>
